/**
 * @ClassName SystemDemo02
 * @Description 输出for循环打印数字1-9999所需使用的时间
 * @Author Li
 * @Date 2022/8/3 11:57
 * @ModifyDate 2022/8/3 11:57
 * @Version 1.0
 */
public class SystemDemo02 {
    public static void main(String[] args) {
        // 获取当前时间毫秒值
        long startTime = System.currentTimeMillis();
        for (int i = 1; i <= 9999; i++) {
            System.out.println(i);
        }
        long endTime = System.currentTimeMillis();
        System.out.println("共耗时 " + (endTime - startTime) + "毫秒！");
    }
}
